<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="myjsframe.js"></script>
<script src="area.js"></script>
<title>省市联动</title>
<style type="text/css">
body, select {font-size:12px; font-family:Tahoma}
td { line-height:2em}
strong { color:red; display:block}
</style>
</head>

<body>
<h1>省市联动极端演示</h1>
<p id="demo">已被覆盖的文字...</p>
<p id="demo2">未被覆盖的文字...</p>
<table width="100%" height="149" border="1">
  <tr>
    <td>&nbsp;
	<script type="text/javascript">	
    	var area = new AreaCtrl("省份:","城市:","地区:");
		area.write();
    </script>
	<strong>显示三级数据</strong>
	</td>
    <td>&nbsp;
	<script type="text/javascript">	
    	var area = new AreaCtrl(" 省份："," 城市：");
		area.name = ["shengfen","chengshi"];
		area.write();
    </script>	
	<strong>仅显示省份、城市；控件名称分别为：shengfen,chengshi</strong>
	</td>
    <td>&nbsp;
	<script type="text/javascript">	
    	var area = new AreaCtrl("省份");
		area.write();
    </script>
	<strong>仅显示省份</strong>
	</td>
  </tr>
  <tr>
    <td>&nbsp;
	<script type="text/javascript">	
    	var area = new AreaCtrl(" Prov:"," City:"," Area:");
		area.value = 440303;
		area.name = ["sheng","shi","qu"];
		area.write();
    </script>
	<strong>定位到“地区”，根据罗湖区的代码（440303）自动选择广东与深圳；控件名称为：sheng,shi,qu</strong>
	</td>
    <td>&nbsp;
	<script type="text/javascript">	
    	var area = new AreaCtrl("省份","城市","地区");
		area.value = 440300;
		area.write();
    </script>
	<strong>定位到“城市”</strong>
	</td>
    <td>&nbsp;
	<script type="text/javascript">	
    	var area = new AreaCtrl("<br />省份：","<br />城市：","<br />地区：");
		area.value = 440000;
		area.write();
    </script><strong>定位到“广东”</strong>
	</td>
  </tr>
</table>
	<script type="text/javascript">	
    	var area = new AreaCtrl(" "," "," ");
		area.writeIn("demo");
    </script>
	<script type="text/javascript">	
    	var area = new AreaCtrl("","","");
		area.writeIn("demo2",true);
    </script>	<br />
	<script type="text/javascript">	
    	var area = new AreaCtrl("","");
		area.value = 440300;
		area.write();
    </script>	
<p>	
控件的默认名称为：省：Province，市：City，区：Area<br />
取同名控件值，asp可以使用 Request.Form("Province")(0)、Request.Form("Province")(1)......； <br />php需要自定义控件名称，如Province[]，City[]，Area[]
</p>
<a href="http://www.caizq.cn/sample/20070807/area.js" style="font-size:2em; color:blue">下载控件</a>
<p style="text-align:center; margin:3em"><a href="http://www.happyshow.org/" target="_blank">happyshow.org</a></p>
</body>
</html>
